package com.greyu.ysj.mapper;

import com.greyu.ysj.entity.CbtReward;
import com.greyu.ysj.entity.CbtRewardExample;

import java.util.Date;
import java.util.List;
import org.apache.ibatis.annotations.Param;

public interface CbtRewardMapper {
    long countByExample(CbtRewardExample example);

    int deleteByExample(CbtRewardExample example);

    int deleteByPrimaryKey(Integer id);

    int insert(CbtReward record);

    int insertSelective(CbtReward record);

    List<CbtReward> selectByExample(CbtRewardExample example);

    CbtReward selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") CbtReward record, @Param("example") CbtRewardExample example);

    int updateByExample(@Param("record") CbtReward record, @Param("example") CbtRewardExample example);

    int updateByPrimaryKeySelective(CbtReward record);

    int updateByPrimaryKey(CbtReward record);
    //*********************************************
    CbtReward selectRewardByuserId(int userId);
    
    double selectTotalRewardByuserId(int userId);
    
}